package main

import (
	"context"
	"encoding/json"
	"fmt"
	"gitee.com/leo-xin/novel_distribution_sdk_go/wending/kyy"
	"gitee.com/leo-xin/novel_distribution_sdk_go/wending/kyy/config"
	"io"
)

func rechargeListExample() {

	ctx := context.Background()

	configuration := config.NewConfiguration()
	apiClient := kyy.Init(configuration)

	resp, httpRes, err := apiClient.RechargeListApi().
		Get(ctx).
		AppSecret(AppSecret).AppKey(AppKey).StartTime(1727049600000).EndTime(1727112600000).
		Execute()

	s, _ := json.Marshal(resp)
	fmt.Println(string(s))

	if httpRes != nil {
		resBytes, _ := io.ReadAll(httpRes.Body)
		fmt.Println(string(resBytes))
	}
	fmt.Println(err)

}
